package com.syedu.cels.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * description：词汇类
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class Vocabulary extends Base {
    //特有属性
    private String abbreviation;//缩写

    public Vocabulary(String en, List<String> cn) {
        super(en, cn);
    }

    public Vocabulary(String en, List<String> cn, String abbreviation) {
        super(en, cn);
        this.abbreviation = abbreviation;
    }

    @Override
    public String toString() {
        String result = super.toString();
        if (abbreviation != null) {
            result += ",缩写: " + abbreviation + "\n";
        }
        return result;
    }
}